New functions to set the colormap or visual of an existing widget. These
authorOwen Taylor <otaylor@redhat.com>
Tue, 26 Jan 1999 01:18:13 +0000 (01:18 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 26 Jan 1999 01:18:13 +0000 (01:18 +0000)
Mon Jan 25 20:05:22 1999  Owen Taylor  <otaylor@redhat.com>

* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):
New functions to set the colormap or visual
of an existing widget. These functions should not
be called on a widget that has previosly been
realized.

gtk/gtkwidget.h

index f41442cb46319438ef89f4d4b4f96e12563895f2..ac08a6ed9582876655e2edf8267da279ba341911 100644 (file)
@@ -528,6 +528,19 @@ GtkWidget*   gtk_widget_get_ancestor       (GtkWidget      *widget,
                                         GtkType        widget_type);
 GdkColormap* gtk_widget_get_colormap   (GtkWidget      *widget);
 GdkVisual*   gtk_widget_get_visual     (GtkWidget      *widget);
+
+/* The following functions must not be called on an already
+ * realized widget. Because it is possible that somebody
+ * can call get_colormap() or get_visual() and save the
+ * result, these functions are probably only safe to
+ * call in a widget's init() function.
+ */
+void         gtk_widget_set_colormap    (GtkWidget      *widget,
+                                        GdkColormap    *colormap);
+void         gtk_widget_set_visual      (GtkWidget      *widget, 
+                                        GdkVisual      *visual);
+
+
 gint        gtk_widget_get_events      (GtkWidget      *widget);
 void        gtk_widget_get_pointer     (GtkWidget      *widget,
                                         gint           *x,